home *** CD-ROM | disk | FTP | other *** search
/ Hyper Animation Series: Viper (Limited Edition) / Hyper Animation Series: VIPER (Limited Edition).iso / pc / SYSTEM / class / StgFrame.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-08-04  |  7.0 KB  |  309 lines

  1. import java.awt.Event;
  2.  
  3. class StgFrame extends GameFrame {
  4.    protected GameProcess gameprocess;
  5.    protected HitBg hitbg = new HitBg(this, 1);
  6.    protected PlayerShip playership = new PlayerShip(this, 1);
  7.    protected PlayerShot nomalshot = new PlayerShot(this, 6);
  8.    protected PlayerShot homingshot = new PlayerShot(this, 2);
  9.    protected Enemy enemy = new Enemy(this, 256);
  10.    protected Item item = new Item(this, 256);
  11.    protected PlayerShipIndex playershipindex;
  12.    protected Status status = new Status(this, 0L, 180000L, 999999L, 0L, 1, 2, 3);
  13.    protected ColorItemScore YellowItemScore = new ColorItemScore(200, 0);
  14.    protected ColorItemScore RedItemScore = new ColorItemScore(400, 1);
  15.    protected ColorItemScore BlueItemScore = new ColorItemScore(-200, 2);
  16.    protected Ranking ranking = new Ranking();
  17.    protected int nPlayerShipStock;
  18.    protected int nContinue;
  19.    protected int fxPlayerShipPower;
  20.    protected int fxEnemySpeed;
  21.    protected boolean fClear;
  22.    protected StgWorkData stgworkdata;
  23.    protected boolean fPose = false;
  24.    protected boolean fImmortal = false;
  25.    protected boolean fSelect = false;
  26.  
  27.    public StgFrame(JglFrame var1) {
  28.       super(var1);
  29.       this.setRanginkIndex(this.ranking);
  30.       this.nPlayerShipStock = 3;
  31.       this.nContinue = 1;
  32.       this.fxPlayerShipPower = 65536;
  33.       this.fxEnemySpeed = 65536;
  34.       this.fClear = false;
  35.       this.stgworkdata = new StgWorkData();
  36.       this.gameprocess = new InitProcess(this);
  37.    }
  38.  
  39.    private void setRanginkIndex(Ranking var1) {
  40.       int[] var2 = new int[]{18, 14, 6, 13, 0, 29};
  41.       var1.add(new RankingIndex(var2, 180000));
  42.       int[] var3 = new int[]{21, 8, 15, 4, 17, 29};
  43.       var1.add(new RankingIndex(var3, 160000));
  44.       int[] var4 = new int[]{12, 20, 18, 4, 20, 12};
  45.       var1.add(new RankingIndex(var4, 140000));
  46.       int[] var5 = new int[]{29, 10, 0, 19, 14, 29};
  47.       var1.add(new RankingIndex(var5, 120000));
  48.       int[] var6 = new int[]{19, 0, 12, 0, 8, 29};
  49.       var1.add(new RankingIndex(var6, 100000));
  50.       int[] var7 = new int[]{28, 2, 19, 17, 28, 29};
  51.       var1.add(new RankingIndex(var7, 80000));
  52.       int[] var8 = new int[]{28, 6, 19, 18, 28, 29};
  53.       var1.add(new RankingIndex(var8, 60000));
  54.       int[] var9 = new int[]{28, 1, 19, 17, 28, 29};
  55.       var1.add(new RankingIndex(var9, 40000));
  56.    }
  57.  
  58.    public void setHitBg(HitBg var1) {
  59.       this.hitbg = var1;
  60.    }
  61.  
  62.    public void setPlayerShip(PlayerShip var1) {
  63.       this.playership = var1;
  64.    }
  65.  
  66.    public void setNomalShot(PlayerShot var1) {
  67.       this.nomalshot = var1;
  68.    }
  69.  
  70.    public void setHomingShot(PlayerShot var1) {
  71.       this.homingshot = var1;
  72.    }
  73.  
  74.    public void setEnemy(Enemy var1) {
  75.       this.enemy = var1;
  76.    }
  77.  
  78.    public void setItem(Item var1) {
  79.       this.item = var1;
  80.    }
  81.  
  82.    public void setPlayerShipIndex(PlayerShipIndex var1) {
  83.       this.playershipindex = var1;
  84.    }
  85.  
  86.    public void setStatus(Status var1) {
  87.       this.status = var1;
  88.    }
  89.  
  90.    public void setYellowItemScore(ColorItemScore var1) {
  91.       this.YellowItemScore = var1;
  92.    }
  93.  
  94.    public void setRedItemScore(ColorItemScore var1) {
  95.       this.RedItemScore = var1;
  96.    }
  97.  
  98.    public void setBlueItemScore(ColorItemScore var1) {
  99.       this.BlueItemScore = var1;
  100.    }
  101.  
  102.    public void setRanking(Ranking var1) {
  103.       this.ranking = var1;
  104.    }
  105.  
  106.    public void setGameProcess(GameProcess var1) {
  107.       this.gameprocess = var1;
  108.    }
  109.  
  110.    public void setPlayerShipStock(int var1) {
  111.       this.nPlayerShipStock = var1;
  112.    }
  113.  
  114.    public void setContinue(int var1) {
  115.       this.nContinue = var1;
  116.    }
  117.  
  118.    public void setPlayerShipPower(int var1) {
  119.       this.fxPlayerShipPower = var1;
  120.    }
  121.  
  122.    public void setEnemySpeed(int var1) {
  123.       this.fxEnemySpeed = var1;
  124.    }
  125.  
  126.    public void setClear(boolean var1) {
  127.       this.fClear = var1;
  128.    }
  129.  
  130.    public void setStgWorkData(StgWorkData var1) {
  131.       this.stgworkdata = var1;
  132.    }
  133.  
  134.    public HitBg getHitBg() {
  135.       return this.hitbg;
  136.    }
  137.  
  138.    public PlayerShip getPlayerShip() {
  139.       return this.playership;
  140.    }
  141.  
  142.    public PlayerShot getNomalShot() {
  143.       return this.nomalshot;
  144.    }
  145.  
  146.    public PlayerShot getHomingShot() {
  147.       return this.homingshot;
  148.    }
  149.  
  150.    public Enemy getEnemy() {
  151.       return this.enemy;
  152.    }
  153.  
  154.    public Item getItem() {
  155.       return this.item;
  156.    }
  157.  
  158.    public PlayerShipIndex getPlayerShipIndex() {
  159.       return this.playershipindex;
  160.    }
  161.  
  162.    public Status getStatus() {
  163.       return this.status;
  164.    }
  165.  
  166.    public ColorItemScore getYellowItemScore() {
  167.       return this.YellowItemScore;
  168.    }
  169.  
  170.    public ColorItemScore getRedItemScore() {
  171.       return this.RedItemScore;
  172.    }
  173.  
  174.    public ColorItemScore getBlueItemScore() {
  175.       return this.BlueItemScore;
  176.    }
  177.  
  178.    public Ranking getRanking() {
  179.       return this.ranking;
  180.    }
  181.  
  182.    public GameProcess getGameProcess() {
  183.       return this.gameprocess;
  184.    }
  185.  
  186.    public int getPlayerShipStock() {
  187.       return this.nPlayerShipStock;
  188.    }
  189.  
  190.    public int getContinue() {
  191.       return this.nContinue;
  192.    }
  193.  
  194.    public int getPlayerShipPower() {
  195.       return this.fxPlayerShipPower;
  196.    }
  197.  
  198.    public int getEnemySpeed() {
  199.       return this.fxEnemySpeed;
  200.    }
  201.  
  202.    public boolean getClear() {
  203.       return this.fClear;
  204.    }
  205.  
  206.    public StgWorkData getStgWorkData() {
  207.       return this.stgworkdata;
  208.    }
  209.  
  210.    public void run() {
  211.       super.resource.getJglPad();
  212.       if (!this.fPose) {
  213.          this.gameprocess.run();
  214.          switch (this.gameprocess.getAttr()) {
  215.             case 0:
  216.                this.hitbg.action();
  217.                this.playership.action();
  218.                this.enemy.action();
  219.                this.nomalshot.action();
  220.                this.homingshot.action();
  221.                this.item.action();
  222.                return;
  223.             case 1:
  224.             case 2:
  225.             default:
  226.                return;
  227.             case 3:
  228.                this.hitbg.action();
  229.                this.playership.action();
  230.                this.enemy.action();
  231.                this.nomalshot.action();
  232.                this.homingshot.action();
  233.                this.item.action();
  234.                return;
  235.             case 4:
  236.                this.getGameProcess().setAttr(0);
  237.          }
  238.       }
  239.    }
  240.  
  241.    protected boolean putPlayerShip(int var1, int var2, int var3, int var4) {
  242.       this.status.setBom(var3);
  243.       this.playershipindex = new PlayerShipIndex(new Position(0, 8388608, 0), StgData.getSpriteAnimePlayerShipStart(), new Position(98304, 131072, 0), 0, new PlayerShipStart(this), this.nomalshot, this.homingshot, var1, var2, var3, var4);
  244.       return this.playership.add(this.playershipindex);
  245.    }
  246.  
  247.    public boolean action(Event var1, Object var2) {
  248.       return this.gameprocess.action(var1, var2);
  249.    }
  250.  
  251.    public boolean mouseUp(Event var1, int var2, int var3) {
  252.       return this.gameprocess.mouseUp(var1, var2, var3);
  253.    }
  254.  
  255.    public boolean mouseDown(Event var1, int var2, int var3) {
  256.       return this.gameprocess.mouseDown(var1, var2, var3);
  257.    }
  258.  
  259.    public boolean mouseMove(Event var1, int var2, int var3) {
  260.       return this.gameprocess.mouseMove(var1, var2, var3);
  261.    }
  262.  
  263.    public boolean mouseDrag(Event var1, int var2, int var3) {
  264.       return this.gameprocess.mouseDrag(var1, var2, var3);
  265.    }
  266.  
  267.    public void stop() {
  268.       this.gameprocess.stop();
  269.    }
  270.  
  271.    public void destroy() {
  272.       this.gameprocess.destroy();
  273.    }
  274.  
  275.    public boolean gotFocus(Event var1, Object var2) {
  276.       this.fPose = false;
  277.       return true;
  278.    }
  279.  
  280.    public boolean lostFocus(Event var1, Object var2) {
  281.       this.fPose = true;
  282.       return true;
  283.    }
  284.  
  285.    public void setPose(boolean var1) {
  286.       this.fPose = var1;
  287.    }
  288.  
  289.    public void setImmortal(boolean var1) {
  290.       this.fImmortal = var1;
  291.    }
  292.  
  293.    public void setSelect(boolean var1) {
  294.       this.fSelect = var1;
  295.    }
  296.  
  297.    public boolean getPose() {
  298.       return this.fPose;
  299.    }
  300.  
  301.    public boolean getImmortal() {
  302.       return this.fImmortal;
  303.    }
  304.  
  305.    public boolean getSelect() {
  306.       return this.fSelect;
  307.    }
  308. }
  309.